{% extends "base.html" %}
{% block scripts %}
{% include "sortable_table_script.html" %}
{% endblock scripts %}
{% block head_title %}Chemical List{% endblock %}
{% block title %}Chemical List{% endblock %}
{% block content %}
{% if perms.reagents.add_chemical %}<p>Click <a href="{% url chemical-new %}"><img src="{{STATIC_URL}}img/icons/Add.png" width=25 alt="here"></a> for a new chemical</p>{% endif %}
<table>
<thead>
	<tr>
	<th>Chemical</th>
	<th>Source</th>
	<th>Vendor</th>
	</tr>
</thead>
{% for chemical in object_list %}
<tbody>
<tr>
	<td><a href="{% url chemical-detail chemical.id %}">{{ chemical }}</a></td>
	<td>{{chemical.source}}</td>
	<td>{{chemical.vendor}}</td>
	<td>
<a href="{% url chemical-detail chemical.id %}"><img src="{{STATIC_URL}}img/icons/Zoom.png" width=25 alt="Detail"></a>
{% if perms.reagents.change_construct %}
<a href="{% url chemical-edit chemical.id %}"><img src="{{STATIC_URL}}img/icons/Document Write.png" width=25 alt="Edit"></a>
{% endif %}
{% if perms.reagents.delete_construct %}
<a href="{% url chemical-delete chemical.id %}"><img src="{{STATIC_URL}}img/icons/Close.png" width=25 alt="delete"></a>
{% endif %}
</tr>
{% endfor %}
</tbody>
</table>
<p>Click <a href="{% url chemical-new %}"><img src="{{STATIC_URL}}img/icons/add.png" width=25 alt="here"></a> for a new chemical</p>
{% endblock %}
